/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package service.inventory.impl;

import dao.inventory.AdjMstDao;
import java.util.List;
import model.inventory.AdjMst;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import service.inventory.AdjMstService;

/**
 *
 * @author Yusup Jauhari Shandi <in.visi>
 */
@Service("adjMstService")
@Transactional(readOnly=true)
public class AdjMstServiceImpl implements AdjMstService{
    @Autowired private AdjMstDao adjMstDao;

    @Transactional(readOnly=false)
    @Override
    public boolean save(AdjMst adjMst) {
        return  adjMstDao.saveData(adjMst);
    }

    @Override
    public boolean delete(AdjMst adjMst) {
        return  adjMstDao.delete(adjMst);
    }

   

    @Override
    public List<AdjMst> getAdjMst() {
        return  adjMstDao.getAll();
    }

    @Override
    public List<AdjMst> getAdjMst(int start, int num) {
        return adjMstDao.getAll(start, num);
    }

    @Override
    public List<AdjMst> getAdjMst(int start, int num, String params, String orderBy) {
        return adjMstDao.getAll(start, num, params, orderBy);
    }

    @Override
    public AdjMst getAdjMst(Long id) {
        return adjMstDao.getById(id);
    }

    @Override
    public AdjMst getAdjMst(String num) {
        return adjMstDao.getByKode("tran_num", num);
    }

   
}
